Skip to content

Add configurable datum LLH transformation using PROJ - #104

Merged
flipflip8952 merged 3 commits into
mainfrom
feature/proj
Oct 29, 2026
Merged

flipflip8952 merged 3 commits into
mainfrom
feature/proj

Conversation

@fgarciacardenas

@fgarciacardenas fgarciacardenas commented Jan 26, 2026 •

Copy link
Copy Markdown
Contributor
  • Add an optional datum LLH transformation for the odometry_llh and datum output topics.
  • This supports any transformation supported by PROJ, incl. orthometric height. See also the notes below.
  • Add datum_llh.{enabled,ecef_crs,llh_crs} config params to configure it, off by default (i.e. use built-in WGS-84 transformation as before)
  • Bump fixposition-sdk

Notes (if datum_llh.enabled = true, i.e. using transformations):

  • The source CRS must be geocentric, and the target CRS must be geographic 3D or
    geographic 2D + vertical.
  • We require precise transformations from PROJ. For orthometric height you may have to download PROJ grid data for this to work. See the driver documentation.
  • The node refuses to start if fixposition-sdk was build without PROJ support

See https://docs.fixposition.com/fd/custom-geodetic-datum-and-orthometric-height for the documentation

flipflip8952
flipflip8952 previously approved these changes Feb 2, 2026
@flipflip8952 flipflip8952 changed the title Added support for proj to use custom geodetic datums and orthometric height Add support for custom geodetic datums and orthometric height Jul 8, 2026
@flipflip8952
flipflip8952 marked this pull request as draft August 3, 2026 19:39
Comment thread fixposition_driver_ros1/src/data_to_ros1.cpp Outdated
@fgarciacardenas
fgarciacardenas force-pushed the feature/proj branch 3 times, most recently from d6e8ff6 to f76acfc Compare September 14, 2026 12:42
@fgarciacardenas
fgarciacardenas marked this pull request as ready for review September 14, 2026 13:01

@flipflip8952 flipflip8952 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss. I'm not sure I agree with the implementation.

Simplify LlhTransformer thread safety

Create the PROJ state once in Init() and use a mutex for the transforms,
instead of per-thread PROJ state. Only the driver worker thread transforms
coordinates, so per-thread state is not necessary.

Use SDK Transformer for datum LLH, remove LlhTransformer

The SDK Transformer now has the options, CRS checks and thread safety that
LlhTransformer had. The driver keeps only the policy: InitLlhTrafo() checks
the CRS types, EcefToLlhRad() falls back to the built-in WGS84 conversion
if datum LLH is disabled. Without PROJ (FPSDK_USE_PROJ=0) the driver uses
the built-in WGS84 conversion and rejects datum LLH enabled. The driver no
longer links PROJ directly.

Use BUILD_TESTING for fixposition_driver_lib tests

Use include(CTest) and BUILD_TESTING (default ON) instead of
FPSDK_BUILD_TESTING. Build the tests only if GTest is available.

Load ROS1 datum_llh params only if the namespace exists

If datum_llh is present, all its params are required. If it is absent, the
defaults stay. Remove LoadOptionalRosParam().
@flipflip8952 flipflip8952 changed the title Add support for custom geodetic datums and orthometric height Add configurable datum LLH transformation using PROJ Oct 29, 2026
@flipflip8952
flipflip8952 requested review from flipflip8952 and joaomsbernardino and removed request for flipflip8952 and joaomsbernardino October 29, 2026 10:50
@flipflip8952
flipflip8952 merged commit 42cc24d into main Oct 29, 2026
4 checks passed
@flipflip8952
flipflip8952 deleted the feature/proj branch October 29, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants